<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>首页：欢迎光临XDA社区</title>
<link rel="stylesheet" href="bootstrap-3.0.3/css/bootstrap.min.css">
<script src="js/jquery-2.1.1.min.js"></script>
<script src="bootstrap-3.0.3/js/bootstrap.min.js"></script>
<!-- <script type="text/javascript">
	if($.trim("${sessionScope.adminAccount}") == "")
	{
	      top.location.href="admin.jsp";
	}
</script> -->
</head>
<body>
	<div style="width:1170px;margin:0px auto;height:1030px;">
		<div><img alt="" src="css/images/logo.png"> </div>
		<nav class="navbar navbar-default" role="navigation">
			<div class="container-fluid">
			<div class="navbar-header" style="margin-left:20px;">
				<a class="navbar-brand" href="#">首页</a>
			</div>
			<div>
				<ul class="nav navbar-nav">
					<li class="active"><a href="#">个人主页</a></li>
					<li class="dropdown">
						<a href="#" class="dropdown-toggle" data-toggle="dropdown">
							我的邮箱
							<b class="caret"></b>
						</a>
						<ul class="dropdown-menu">
							<li><a href="#">jmeter</a></li>
							<li><a href="#">EJB</a></li>
							<li><a href="#">Jasper Report</a></li>
							<li class="divider"></li>
							<li><a href="#">分离的链接</a></li>
							<li class="divider"></li>
							<li><a href="#">另一个分离的链接</a></li>
						</ul>
					</li>
				</ul>
			</div>
			</div>
			<div class="container-fluid"> 
				<div class="navbar-header">
					<a class="navbar-brand" href="selectQuery">发表主题</a>
				</div>
				<form class="navbar-form navbar-left" role="search">
					<div class="form-group">
						<input type="text" class="form-control" placeholder="主题">
					</div>
					<button type="submit" class="btn btn-default">搜索</button>
				</form>
			</div>
			<div class="container-fluid" style="margin-right:20px;">
				<c:if test="${loginUser!=null}">
					<ul class="nav navbar-nav navbar-right">
				      <li><a href="#"><span class="glyphicon glyphicon-user"></span>${loginUser.userName} </a></li>
				      <li><a href="cancel"><span class="glyphicon glyphicon-log-in"></span>注销</a></li>
				    </ul> 
				</c:if>
				<c:if test="${loginUser==null}">
			    <ul class="nav navbar-nav navbar-right">
			      <li><a href="user_register.jsp"><span class="glyphicon glyphicon-user"></span> 注册</a></li>
			      <li><a href="user_login.jsp"><span class="glyphicon glyphicon-log-in"></span> 登录</a></li>
			    </ul>
			     </c:if>
			 </div>
		</nav>
		<div id="myCarousel" class="carousel slide" style="width:600px;float:left;">
			<!-- 轮播（Carousel）指标 -->
			<ol class="carousel-indicators">
				<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
				<li data-target="#myCarousel" data-slide-to="1"></li>
				<li data-target="#myCarousel" data-slide-to="2"></li>
			</ol>   
			<!-- 轮播（Carousel）项目 -->
			<div class="carousel-inner">
				<div class="item active">
					<img src="pictures/banner/bartlesvillecf.jpg" alt="First slide" style="width:600px;height:300px;">
				</div>
				<div class="item">
					<img src="pictures/banner/emancipation.jpg" alt="Second slide" style="width:600px;height:300px;">
				</div>
				<div class="item">
					<img src="pictures/banner/okwu.jpg" alt="Third slide" style="width:600px;height:300px;">
				</div>
				<div class="item">
					<img src="pictures/banner/okwu-athletics.jpg" alt="Third slide" style="width:600px;height:300px;">
				</div>
			</div>
			<!-- 轮播（Carousel）导航 -->
			<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
				<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
				<span class="sr-only">Previous</span>
			</a>
			<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
				<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
				<span class="sr-only">Next</span>
			</a>
		</div> 
		<!-- 热门讨论 -->
		<div style="width:540px;float:left;margin-left:28px;"id="FontScroll">
			<h4>正在讨论</h4>
			<ul class="list-group" style="color:#0C91E0;z-index:0;">
				<c:forEach items="${topics}" var="topic">
					<li class="list-group-item">
						<span class="badge">回复:${topic.commentTimes}</span>
						<a href="">${topic.title}</a>
					</li>
				</c:forEach>
			</ul>
		</div>
		
		<div style="clear: left;width:1170px;border:1px solid #DEDEDE;line-height: 35px;background-color: #F5F5F5;font-size: 13px;text-indent: 
		1.5em;margin-top:10px;">
			智能手机OS讨论区
		</div>
		<c:forEach items="${forums}" var="forum">
		<div class="row" style="float:left; width:268px;height:230px;text-align:center; margin-top:15px;margin-bottom: 20px;margin-left:8px;margin-right:8px;" >
		    <div class="col-sm-6 col-md-3" style="clear: left;width:268px;height:230px;">
		        <div class="thumbnail" style="clear: left;width:268px;height:230px;">
		            <img src="pictures/forum/forum_${forum.id}_icon.png">
		            <div class="caption">
		                <h3 style="color:#0F92F8;"><a href="isbest?forumId=${forum.id}">${forum.name }</a></h3>
		                <p>${forum.description }</p>
		            </div>
		        </div>
		    </div>
		</div>
		</c:forEach>
	</div>
	<div id="footer" style="width:1170px;height:70px; margin:0px auto;background-color: #F5F5F5;text-align: center;border:1px solid #EBEBEB;">
		<p>手机论坛 xda.cn</p>
		<p>Designed Sam Chen</p>
	</div>
</body>
</html>